'''
@Project ：pythonApiTest 
@File    ：async_execute.py
@IDE     ：PyCharm 
@Author  ：胡文
@Date    ：2025/2/28 上午9:41 
'''
import asyncio
import aiohttp

async def async_execute(case):
    async with aiohttp.ClientSession() as session:
        async with session.request(
            method=case['method'],
            url=case['url'],
            json=case['params']
        ) as response:
            return await response.json()